<!--
- Author:  LiShibin.
- Date:    2018/11/15.
- File:    finish-data.
-->
<template>
  <div class="Web_Box">
    <div class="Topmenu"><i class="iconfont icon-youjiantou" @click="$utils.back()"><a href=""></a></i>
      <h1>完善资料</h1>
      <span></span>
    </div>
    <div class="login_dl">
      <div class="login_ipt1">
        <i class="iconfont icon-denglu_shoujihao1"></i><input type="number" placeholder="输入手机号" v-model="mobile">

      </div>
      <div class="login_ipt1">
        <i class="iconfont icon-wangjimima_yanzhengma"></i><input type="number" placeholder="输入密码" v-model="password">
      </div>
      <div class="login_ipt1">
        <i class="iconfont icon-yanzhengma"></i><input type="number" placeholder="验证码" v-model="secode">
        <!--<span>发送验证码</span>-->
        <span style="width: 120px;">
          <message-code type="2" :tel="mobile"  :callback="handleMessageCode"></message-code>
        </span>
      </div>
    </div>
    <div class="login_btn1" style="    padding: 3rem 10px;">
      <span @click="finishData">提交</span>
    </div>
  </div>
</template>

<script>
  import messageCode from '../../components/message-code.vue'

  export default {
    data() {
      return {
        mobile: '',
        password: '',
        secode: ''
      }
    },
    components: {
      'message-code': messageCode
    },
    methods: {
      handleMessageCode(code) {
        this.check_mobile = code
      },
      finishData() {
        this.$request.finishData(this.mobile, this.password, this.secode).then(data => {
          this.$toast('资料完善成功')
          setTimeout(() => {
            this.$router.go(-1)
          }, 2000)
        }).cache(e => {
          console.log(0)
        })
      }
    }
  }
</script>

<style>

</style>
